<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/include/page.jsp"%>
<!DOCTYPE HTML>
<html>
	<head>
		<title>商品分类统计管理 - 商城后台</title>
		<%@ include file="/common/include/title.jsp"%>
		
		<script language="javascript" type="text/javascript" src="${rootpath }/common/resource/My97DatePicker/WdatePicker.js"></script>
		<script type="text/javascript">
			$(function () {
			    Highcharts.chart('container', {
			        chart: {
			            type: 'spline'
			        },
			        title: {
			            text: '分类数量统计'
			        },
			        subtitle: {
			            text: '来源:sxt'
			        },
			        xAxis: {
			            categories: [
		            	<c:forEach items="${requestScope.resultList }" var="map" varStatus="stat">
		            		'${map.cateName}'
		            		<c:if test="${!stat.last}">
		            			,
		            		</c:if>
		        		</c:forEach>
			            	]
			        },
			        yAxis: {
			            title: {
			                text: '条数'
			            },
			            labels: {
			                formatter: function () {
			                    return this.value + '条';
			                }
			            }
			        },
			        tooltip: {
			            crosshairs: true,
			            shared: true
			        },
			        plotOptions: {
			            spline: {
			                marker: {
			                    radius: 4,
			                    lineColor: '#666666',
			                    lineWidth: 1
			                }
			            }
			        },
			        series: [
				        {
				            name: '商品数量',
				            marker: {
				                symbol: 'square'
				            },
				            data: [
			            	<c:forEach items="${requestScope.resultList }" var="map" varStatus="stat">
			            		${map.count}
			            		<c:if test="${!stat.last}">
			            			,
			            		</c:if>
			        		</c:forEach>
				            ]
				
				       },
				       {
				            name: '最低价',
				            marker: {
				                symbol: 'square'
				            },
				            data: [
			            	<c:forEach items="${requestScope.resultList }" var="map" varStatus="stat">
			            		<fmt:formatNumber value="${map.minPrice}" pattern="0.00"/>
			            		<c:if test="${!stat.last}">
			            			,
			            		</c:if>
			        		</c:forEach>
				            ]
				
				       },
				       {
				            name: '最高价',
				            marker: {
				                symbol: 'square'
				            },
				            data: [
			            	<c:forEach items="${requestScope.resultList }" var="map" varStatus="stat">
			            		<fmt:formatNumber value="${map.maxPrice}" pattern="0.00"/>
			            		<c:if test="${!stat.last}">
			            			,
			            		</c:if>
			        		</c:forEach>
				            ]
				
				       }
				       ]
			    });
			});
		</script>
		<script src="${rootpath }/common/resource/Highcharts-5.0.7/code/highcharts.js"></script>
		<script src="${rootpath }/common/resource/Highcharts-5.0.7/code/modules/exporting.js"></script>
	</head>
	<body>
		<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
		<nav class="breadcrumb">
			<i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span>
			产品管理 <span class="c-gray en">&gt;</span> 品牌管理 <a
				class="btn btn-success radius r mr-20"
				style="line-height: 1.6em; margin-top: 3px"
				href="javascript:location.replace(location.href);" title="刷新"><i
				class="Hui-iconfont">&#xe68f;</i></a>
		</nav>
		<div class="pd-20">
			<div class="text-c">
				<form class="Huiform" method="post" action="${rootpath }/back/goods/brandList.htm" target="_self">
					<input type="text" name="keyword" placeholder="关键字" value="${requestScope.keyword }" class="input-text"
						style="width: 120px">
					<span class="select-box" style="width: 150px">
						<select class="select" name="status" size="1">
							<option value="1" ${requestScope.status == '1' ? 'selected' : '' }>启aaaaaa用</option>
							<option value="0" ${requestScope.status == '0' ? 'selected' : '' }>禁用</option>
						</select>
					</span>
					<input name="st" value="${requestScope.st }" class="input-text" style="width:150px;" type="text" placeholder="起始时间" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})">
					<input name="ed" value="${requestScope.ed }" class="input-text" style="width:150px;" type="text" placeholder="结束时间" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})">
					<button type="submit" class="btn btn-success" id="" name="">
						搜索
					</button>
				</form>
			</div>
			<div class="cl pd-5 bg-1 bk-gray mt-20">
				<span class="l">
					<a href="javascript:;" onclick="datadel()" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i>
						批量删除</a>
					<a href="#" onclick="brand_add('品牌添加','${rootpath }/back/goods/brandInsert.htm')" class="btn btn-success">添加</a>
				</span>
						
				<span class="r">共有数据：<strong>54</strong> 条
				</span>
			</div>
			<div class="mt-20">
				<table class="table table-border table-bordered table-bg table-sort">
					<thead>
						<tr class="text-c">
							<th width="25"><input type="checkbox" name="" value=""></th>
							<th width="70">序号</th>
							<th width="80">分类</th>
							<th width="80">分类名称</th>
							<th width="80">数量</th>
							<th width="80">最低价</th>
							<th width="80">最高价</th>
							<th width="100">操作</th>
						</tr>
					</thead>
					<tbody>
						<c:forEach items="${requestScope.resultList }" var="map" varStatus="stat">
							<tr class="text-c">
								<td><input name="" type="checkbox" value=""></td>
								<td>${stat.count }</td>
								<td>${map.cateId}</td>
								<td>${map.cateName}</td>
								<td>${map.count}</td>
								<td><fmt:formatNumber value="${map.minPrice}" pattern="0.00"/></td>
								<td><fmt:formatNumber value="${map.maxPrice}" pattern="0.00"/></td>
							</tr>
						</c:forEach>
					</tbody>
				</table>
				
			</div>
		</div>
	</body>
</html>
<script type="text/javascript">
/*图片-添加*/
function brand_add(title,url){
	var index = layer.open({
		type: 2,
		title: title,
		content: url
	});
	layer.full(index);
}

/* 品牌更新 */
function brand_update(title,url){
	var index = layer.open({
		type: 2,
		title: title,
		content: url
	});
	layer.full(index);
}
</script>